<?php /* Smarty version Smarty-3.1.19, created on 2017-11-16 10:18:07
         compiled from "/www/wwwroot/kq.nabaowan.cn/sdk/theme/admin/default/views/classes/edit.html" */ ?>
<?php /*%%SmartyHeaderCode:9744977175a02ba541cb4c3-12320990%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '5ac67fc1feb1945fa3551230172f24fab7d63710' => 
    array (
      0 => '/www/wwwroot/kq.nabaowan.cn/sdk/theme/admin/default/views/classes/edit.html',
      1 => 1510798664,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '9744977175a02ba541cb4c3-12320990',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.19',
  'unifunc' => 'content_5a02ba54207ae4_96098528',
  'variables' => 
  array (
    'row' => 0,
    'techer' => 0,
    'v' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5a02ba54207ae4_96098528')) {function content_5a02ba54207ae4_96098528($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ('public/header.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>


<div class="main-content">

<div class="page-content">

  <div class="page-content-area" style="opacity: 0.8;"> <br>

    <div class="page-header">

      <h1> 班级管理 <small><i class="ace-icon fa fa-angle-double-right"></i> <?php if ($_smarty_tpl->tpl_vars['row']->value['id']) {?>编辑<?php } else { ?>新增<?php }?>班级 </small> </h1>

    </div>

    <div class="row">

      <div class="panel panel-default">

        <div class="panel-body table-responsive">

          <form method="post" class="form-horizontal" role="form" id="submitform" onsubmit="return false">

            <div class="form-group">

              <div class="col-md-6">

                <label class="control-label" for="name">名称</label>

                <input type="text" class="form-control" id="classes" name="classes" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['classes'];?>
">

              </div>

            </div>

            <div class="form-group">

              <div class="col-md-6">

                <label class="control-label" for="name">老师</label>

                <select name="tid" id="tid" class="form-control">

                  <option value="">请选择</option>

                  <?php  $_smarty_tpl->tpl_vars['v'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['v']->_loop = false;
 $_fromtemp = $_smarty_tpl->tpl_vars['techer']->value; $_from = $_smarty_tpl->tpl_vars['techer']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if($_fromtemp)foreach ($_from as $_smarty_tpl->tpl_vars['v']->key => $_smarty_tpl->tpl_vars['v']->value) {
$_smarty_tpl->tpl_vars['v']->_loop = true;
?>

                  <option value="<?php echo $_smarty_tpl->tpl_vars['v']->value['id'];?>
" <?php if ($_smarty_tpl->tpl_vars['v']->value['id']==$_smarty_tpl->tpl_vars['row']->value['tid']) {?>selected<?php }?> ><?php echo $_smarty_tpl->tpl_vars['v']->value['name'];?>
, <?php echo $_smarty_tpl->tpl_vars['v']->value['phone'];?>
</option>

                  <?php } ?>

                </select>

              </div>

            </div>

            <div class="form-group">

              <div class="col-md-6">

                <label class="control-label" for="name">排序</label>

                <input type="text" class="form-control" id="score" name="score" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['score'];?>
">

              </div>

              </div>
              <div class="form-group">
              <div class="col-md-6">
                <label class="control-label" for="name">开始时间</label>
                <input type="text" name="start" id="s" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['start'];?>
"/>
              </div>
            </div>
            <div class="form-group">
              <div class="col-md-6">
                <label class="control-label" for="name">结束时间</label>
                <input type="text" name="end" id="e" value="<?php echo $_smarty_tpl->tpl_vars['row']->value['end'];?>
"/>
              </div>
            </div>
            <div class="form-group">

              <div class="col-md-6">

                <label class="control-label" for="appsecret">描述</label>

                <textarea class="form-control" name="info"><?php echo $_smarty_tpl->tpl_vars['row']->value['info'];?>
</textarea>

              </div>

            </div>

            <div class="form-group">

              <div class="col-md-6">

                <button type="submit" class="btn btn-primary btn-lg btn-submit">提交</button>

              </div>

            </div>

          </form>

        </div>

      </div>

    </div>

  </div>

</div>
<script>

  $("#s").timepicki();
  $("#e").timepicki();

</script>
<script>

var isbusy = false;

$(function(){

	$('#submitform').validate({

		focusInvalid: true,

		rules: {

			//title: {

				//required: true

			//}

		}

	});

	$('.btn-submit').click(function(){

		if(!$('#submitform').valid())return false;

		if(isbusy)return false;

		isbusy = true;

		tooltipbox.show('正在执行操作...');

		$.post(location.href, $('#submitform').serialize(), function(res){

		    if(res.code == 1){

				location.href = '<?php echo siteurl("con=admin/classes");?>
';

			}

			tooltipbox.show(res.msg);	

			isbusy = false;

		}, 'json').error(function(a, b, c){

			tooltipbox.show('数据或网络错误');

			isbusy = false;

		});

	});

});

</script> 

<?php echo $_smarty_tpl->getSubTemplate ('public/footer.html', $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, null, array(), 0);?>
 <?php }} ?>
